package com.shenmazong.servereduresume.controller;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shenmazong.servereduresume.dto.TbSkill;
import com.shenmazong.servereduresume.service.TbSkillService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import com.shenmazong.vo.ListParamVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *技能表
 */
@RestController
@RequestMapping("skill")
public class TbSkillController {

    @Autowired
    private TbSkillService tbSkillService;

    @PostMapping("findAllSkill")
    public ResultResponse findAllSkill(@RequestBody ListParamVo listParamVo){
        return tbSkillService.findAllSkill(listParamVo);
    }

    @PostMapping("saveSkill")
    public ResultResponse saveSkill(@RequestBody TbSkill tbSkill){
        return tbSkillService.saveSkill(tbSkill);
    }

    @PostMapping("updateSkill")
    public ResultResponse updateSkill(@RequestBody TbSkill tbSkill){
        return tbSkillService.updateSkill(tbSkill);
    }

    @PostMapping("deleteSkill")
    public ResultResponse deleteSkill(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbSkillService.deleteSkill(batchChooseIdVo);
    }
}
